import java.util.List;

public class UserUtil {
	public static final String notFoundMsg = "NO-USER";

	public static String getUserNameOfId(List<User> userList, String userId) {
		for (User user : userList) {
			if (user.getUserId().equals(userId)) {
				return user.getUserName();
			}
		}
		Logger.log(MsgType.ERROR, "User " + userId + " not found in XML");
		return notFoundMsg;
	}
}
